package cms.com.yh.servlet;

import cms.util.HttpCharSet;
import cms.util.InvokeHttp;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 功能:
 * Author: yuhui
 * Date: 2021/4/9 23:38
 */
public class jspRouteServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        HttpCharSet.charSet(req,resp);
        String route = req.getParameter("route");
        InvokeHttp.invokeReq(this,route,req,resp);
    }

    /**
    * 功能描述: 客户模块路由[ —> cusList.js ]
    * @Author: yuhui  2021/4/9 23:41
    */
    public void customerList(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.getRequestDispatcher("WEB-INF/view/custo/cusList.jsp").forward(req,resp);
    }

    public void updatePwd(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.getRequestDispatcher("WEB-INF/view/custo/upPwd.jsp").forward(req,resp);
    }

    public void updateImg(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.getRequestDispatcher("WEB-INF/view/custo/upImg.jsp").forward(req,resp);
    }
}
